import request from '@/utils/request'

// 创建监控
export function createRealTime(data) {
  return request({
    url: '/monitor/real-time/create',
    method: 'post',
    data: data
  })
}

// 更新监控
export function updateRealTime(data) {
  return request({
    url: '/monitor/real-time/update',
    method: 'put',
    data: data
  })
}

// 删除监控
export function deleteRealTime(id) {
  return request({
    url: '/monitor/real-time/delete?id=' + id,
    method: 'delete'
  })
}

// 获得监控
export function getRealTime(id) {
  return request({
    url: '/monitor/real-time/get?id=' + id,
    method: 'get'
  })
}

// 获得监控分页
export function getRealTimePage(query) {
  return request({
    url: '/monitor/real-time/page',
    method: 'get',
    params: query
  })
}

// 导出监控 Excel
export function exportRealTimeExcel(query) {
  return request({
    url: '/monitor/real-time/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
